﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DAO;
using DVO;

public partial class Report : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.User.Identity.Name == "")
        {
            Response.Redirect("Login.aspx");
        }
        else
        {
            if (IsPostBack == false)
            {
                LoadData();
            }
        }
    }

    private void LoadData()
    {
        List<ins_ToolQA_Report_WorkingResult> Objlist = new List<ins_ToolQA_Report_WorkingResult>();
        BLL_Working ObjBLL = new BLL_Working();
        try
        {
            Objlist = ObjBLL.Report();
            grid.DataSource = Objlist;
            grid.DataBind();
        }
        catch (Exception ex)
        {
            Common.WriteLog(ex.Message, ex.StackTrace);
        }
    }
    protected void grid_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        grid.PageIndex = e.NewPageIndex;
        LoadData();
    }
}